Integrand size = 23, antiderivative size = 289 \[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\frac {9 b d^3 (1-2 n) \cot (e+f x) (d \csc (e+f x))^{-3+n}}{f (1-n) (2-n)}+\frac {9 d^3 \cot (e+f x) (d \csc (e+f x))^{-3+n} (b+3 \csc (e+f x))}{f (1-n)}+\frac {3 d^3 \left (3 b^2 (1-n)+9 (2-n)\right ) \cos (e+f x) (d \csc (e+f x))^{-3+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (1-n) (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {b d^4 \left (b^2 (2-n)+27 (3-n)\right ) \cos (e+f x) (d \csc (e+f x))^{-4+n} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4-n}{2},\frac {6-n}{2},\sin ^2(e+f x)\right )}{f (2-n) (4-n) \sqrt {\cos ^2(e+f x)}} \]
a^2*b*d^3*(1-2*n)*cot(f*x+e)*(d*csc(f*x+e))^(-3+n)/f/(n^2-3*n+2)+a^2*d^3*c ot(f*x+e)*(d*csc(f*x+e))^(-3+n)*(b+a*csc(f*x+e))/f/(1-n)+a*d^3*(3*b^2*(1-n )+a^2*(2-n))*cos(f*x+e)*(d*csc(f*x+e))^(-3+n)*hypergeom([1/2, 3/2-1/2*n],[ 5/2-1/2*n],sin(f*x+e)^2)/f/(n^2-4*n+3)/(cos(f*x+e)^2)^(1/2)+b*d^4*(b^2*(2- n)+3*a^2*(3-n))*cos(f*x+e)*(d*csc(f*x+e))^(-4+n)*hypergeom([1/2, 2-1/2*n], [3-1/2*n],sin(f*x+e)^2)/f/(n^2-6*n+8)/(cos(f*x+e)^2)^(1/2)
Time = 1.25 (sec) , antiderivative size = 161, normalized size of antiderivative = 0.56 \[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=-\frac {d \cos (e+f x) (d \csc (e+f x))^{-1+n} \sin ^2(e+f x)^{\frac {1}{2} (-1+n)} \left (9 b^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-1+n),\frac {3}{2},\cos ^2(e+f x)\right )+27 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1+n}{2},\frac {3}{2},\cos ^2(e+f x)\right )+b \csc (e+f x) \left (b^2 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {1}{2} (-2+n),\frac {3}{2},\cos ^2(e+f x)\right )+27 \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {n}{2},\frac {3}{2},\cos ^2(e+f x)\right )\right ) \sqrt {\sin ^2(e+f x)}\right )}{f} \]
-((d*Cos[e + f*x]*(d*Csc[e + f*x])^(-1 + n)*(Sin[e + f*x]^2)^((-1 + n)/2)* (9*b^2*Hypergeometric2F1[1/2, (-1 + n)/2, 3/2, Cos[e + f*x]^2] + 27*Hyperg eometric2F1[1/2, (1 + n)/2, 3/2, Cos[e + f*x]^2] + b*Csc[e + f*x]*(b^2*Hyp ergeometric2F1[1/2, (-2 + n)/2, 3/2, Cos[e + f*x]^2] + 27*Hypergeometric2F 1[1/2, n/2, 3/2, Cos[e + f*x]^2])*Sqrt[Sin[e + f*x]^2]))/f)
Time = 1.55 (sec) , antiderivative size = 298, normalized size of antiderivative = 1.03, number of steps used = 16, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.696, Rules used = {3042, 3717, 3042, 4329, 25, 3042, 4535, 3042, 4259, 3042, 3122, 4534, 3042, 4259, 3042, 3122}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sin (e+f x))^3 (d \csc (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (e+f x))^3 (d \csc (e+f x))^ndx\) |
\(\Big \downarrow \) 3717 |
\(\displaystyle d^3 \int (d \csc (e+f x))^{n-3} (b+a \csc (e+f x))^3dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \int (d \csc (e+f x))^{n-3} (b+a \csc (e+f x))^3dx\) |
\(\Big \downarrow \) 4329 |
\(\displaystyle d^3 \left (\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}-\frac {\int -(d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc ^2(e+f x)+a d \left ((2-n) a^2+3 b^2 (1-n)\right ) \csc (e+f x)+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx}{d (1-n)}\right )\) |
\(\Big \downarrow \) 25 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc ^2(e+f x)+a d \left ((2-n) a^2+3 b^2 (1-n)\right ) \csc (e+f x)+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc (e+f x)^2+a d \left ((2-n) a^2+3 b^2 (1-n)\right ) \csc (e+f x)+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 4535 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc ^2(e+f x)+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx+a \left (a^2 (2-n)+3 b^2 (1-n)\right ) \int (d \csc (e+f x))^{n-2}dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \left (\frac {a \left (a^2 (2-n)+3 b^2 (1-n)\right ) \int (d \csc (e+f x))^{n-2}dx+\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc (e+f x)^2+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc (e+f x)^2+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx+a \left (a^2 (2-n)+3 b^2 (1-n)\right ) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{2-n}dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc (e+f x)^2+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx+a \left (a^2 (2-n)+3 b^2 (1-n)\right ) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{2-n}dx}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle d^3 \left (\frac {\int (d \csc (e+f x))^{n-3} \left (a^2 b d (1-2 n) \csc (e+f x)^2+b d \left ((3-n) a^2+b^2 (1-n)\right )\right )dx+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 4534 |
\(\displaystyle d^3 \left (\frac {\frac {b d (1-n) \left (3 a^2 (3-n)+b^2 (2-n)\right ) \int (d \csc (e+f x))^{n-3}dx}{2-n}+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {a^2 b d (1-2 n) \cot (e+f x) (d \csc (e+f x))^{n-3}}{f (2-n)}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \left (\frac {\frac {b d (1-n) \left (3 a^2 (3-n)+b^2 (2-n)\right ) \int (d \csc (e+f x))^{n-3}dx}{2-n}+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {a^2 b d (1-2 n) \cot (e+f x) (d \csc (e+f x))^{n-3}}{f (2-n)}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 4259 |
\(\displaystyle d^3 \left (\frac {\frac {b d (1-n) \left (3 a^2 (3-n)+b^2 (2-n)\right ) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{3-n}dx}{2-n}+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {a^2 b d (1-2 n) \cot (e+f x) (d \csc (e+f x))^{n-3}}{f (2-n)}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle d^3 \left (\frac {\frac {b d (1-n) \left (3 a^2 (3-n)+b^2 (2-n)\right ) \left (\frac {\sin (e+f x)}{d}\right )^n (d \csc (e+f x))^n \int \left (\frac {\sin (e+f x)}{d}\right )^{3-n}dx}{2-n}+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {a^2 b d (1-2 n) \cot (e+f x) (d \csc (e+f x))^{n-3}}{f (2-n)}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
\(\Big \downarrow \) 3122 |
\(\displaystyle d^3 \left (\frac {\frac {b d^2 (1-n) \left (3 a^2 (3-n)+b^2 (2-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-4} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {4-n}{2},\frac {6-n}{2},\sin ^2(e+f x)\right )}{f (2-n) (4-n) \sqrt {\cos ^2(e+f x)}}+\frac {a d \left (a^2 (2-n)+3 b^2 (1-n)\right ) \cos (e+f x) (d \csc (e+f x))^{n-3} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},\frac {3-n}{2},\frac {5-n}{2},\sin ^2(e+f x)\right )}{f (3-n) \sqrt {\cos ^2(e+f x)}}+\frac {a^2 b d (1-2 n) \cot (e+f x) (d \csc (e+f x))^{n-3}}{f (2-n)}}{d (1-n)}+\frac {a^2 \cot (e+f x) (a \csc (e+f x)+b) (d \csc (e+f x))^{n-3}}{f (1-n)}\right )\) |
d^3*((a^2*Cot[e + f*x]*(d*Csc[e + f*x])^(-3 + n)*(b + a*Csc[e + f*x]))/(f* (1 - n)) + ((a^2*b*d*(1 - 2*n)*Cot[e + f*x]*(d*Csc[e + f*x])^(-3 + n))/(f* (2 - n)) + (a*d*(3*b^2*(1 - n) + a^2*(2 - n))*Cos[e + f*x]*(d*Csc[e + f*x] )^(-3 + n)*Hypergeometric2F1[1/2, (3 - n)/2, (5 - n)/2, Sin[e + f*x]^2])/( f*(3 - n)*Sqrt[Cos[e + f*x]^2]) + (b*d^2*(b^2*(2 - n) + 3*a^2*(3 - n))*(1 - n)*Cos[e + f*x]*(d*Csc[e + f*x])^(-4 + n)*Hypergeometric2F1[1/2, (4 - n) /2, (6 - n)/2, Sin[e + f*x]^2])/(f*(2 - n)*(4 - n)*Sqrt[Cos[e + f*x]^2]))/ (d*(1 - n)))
3.9.25.3.1 Defintions of rubi rules used
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[Cos[c + d*x]*(( b*Sin[c + d*x])^(n + 1)/(b*d*(n + 1)*Sqrt[Cos[c + d*x]^2]))*Hypergeometric2 F1[1/2, (n + 1)/2, (n + 3)/2, Sin[c + d*x]^2], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[2*n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(m_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]^(n_.))^(p_.), x_Symbol] :> Simp[d^(n*p) Int[(d*Csc[e + f*x])^(m - n*p )*(b + a*Csc[e + f*x]^n)^p, x], x] /; FreeQ[{a, b, d, e, f, m, n, p}, x] && !IntegerQ[m] && IntegersQ[n, p]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(b*Csc[c + d*x] )^(n - 1)*((Sin[c + d*x]/b)^(n - 1) Int[1/(Sin[c + d*x]/b)^n, x]), x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + ( a_))^(m_), x_Symbol] :> Simp[(-b^2)*Cot[e + f*x]*(a + b*Csc[e + f*x])^(m - 2)*((d*Csc[e + f*x])^n/(f*(m + n - 1))), x] + Simp[1/(d*(m + n - 1)) Int[ (a + b*Csc[e + f*x])^(m - 3)*(d*Csc[e + f*x])^n*Simp[a^3*d*(m + n - 1) + a* b^2*d*n + b*(b^2*d*(m + n - 2) + 3*a^2*d*(m + n - 1))*Csc[e + f*x] + a*b^2* d*(3*m + 2*n - 4)*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, d, e, f, n}, x ] && NeQ[a^2 - b^2, 0] && GtQ[m, 2] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) && !(IGtQ[n, 2] && !IntegerQ[m])
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(-C)*Cot[e + f*x]*((b*Csc[e + f*x])^m/(f*(m + 1) )), x] + Simp[(C*m + A*(m + 1))/(m + 1) Int[(b*Csc[e + f*x])^m, x], x] /; FreeQ[{b, e, f, A, C, m}, x] && NeQ[C*m + A*(m + 1), 0] && !LeQ[m, -1]
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*((A_.) + csc[(e_.) + (f_.)*(x_)]* (B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.)), x_Symbol] :> Simp[B/b Int[(b*Cs c[e + f*x])^(m + 1), x], x] + Int[(b*Csc[e + f*x])^m*(A + C*Csc[e + f*x]^2) , x] /; FreeQ[{b, e, f, A, B, C, m}, x]
\[\int \left (d \csc \left (f x +e \right )\right )^{n} \left (a +b \sin \left (f x +e \right )\right )^{3}d x\]
\[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{3} \left (d \csc \left (f x + e\right )\right )^{n} \,d x } \]
integral(-(3*a*b^2*cos(f*x + e)^2 - a^3 - 3*a*b^2 + (b^3*cos(f*x + e)^2 - 3*a^2*b - b^3)*sin(f*x + e))*(d*csc(f*x + e))^n, x)
\[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\int \left (d \csc {\left (e + f x \right )}\right )^{n} \left (a + b \sin {\left (e + f x \right )}\right )^{3}\, dx \]
\[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{3} \left (d \csc \left (f x + e\right )\right )^{n} \,d x } \]
\[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\int { {\left (b \sin \left (f x + e\right ) + a\right )}^{3} \left (d \csc \left (f x + e\right )\right )^{n} \,d x } \]
Timed out. \[ \int (d \csc (e+f x))^n (3+b \sin (e+f x))^3 \, dx=\int {\left (\frac {d}{\sin \left (e+f\,x\right )}\right )}^n\,{\left (a+b\,\sin \left (e+f\,x\right )\right )}^3 \,d x \]